<div id="postedComments">
    <g:render template="/shared/commentTemplate" model="[postInstance : postInstance]"/>
</div>


<div id="commentSpinner" class="spinner" style="display:none;">
    <img src="${createLinkTo(dir: 'images', file: 'spinner.gif')}" alt="Spinner"/>
</div>
<jsec:isLoggedIn>
<div id="postCommentMessage">
</div>
 
<g:form url="[action:'saveComment',controller:'archive']" name="commentSave" method="post">
    <div class="label">标题*</div>
    <g:textField class="inputStyle standardFormInput" name="title" value="${postedComment?.title}" maxlength="100"/>

    <div class="label">内容*</div>
    <g:textArea class="inputStyle standardTextArea" name="newCommentContent" value="${postedComment?.content}"/>

    <input type="hidden" name="id" value="${postInstance?.id}"/>
    <div><input class="buttonStyle" type="submit" value="评论"/></div>
</g:form>
 
</jsec:isLoggedIn>
<jsec:isNotLoggedIn>
    <a href="/blog/auth/login?targetUri=%2Farchive%2Fshow%3Fid%3D${postInstance?.id}">请登录后进行评论</a>
</jsec:isNotLoggedIn>
 